<?php
include_once("functions/db_manipulate.php");

connectDB();

$resultSet = getLastNews();

?>
<!DOCTYPE  html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>Нахлыстовый форум theFlyNet.com</title>
    <link rel="stylesheet" href="css/navigation.css">
    <link rel="stylesheet" type="text/css" href="css/news.css">
    <link rel="stylesheet" type="text/css" href="css/square.css">
    <link rel="stylesheet" type="text/css" href="css/menu.css">
    <link rel="stylesheet" type="text/css" href="css/common.css">
    <script src="resources/jquery.js"></script>

    <meta name="keywords"
          content="нахлыст, форум, беларусь, мушки, нахлыстовый, о нахлысте, theflynet, flynet, беларуси">
    <meta name="description" content="Закрытый форум, посвященный непосредственно нахлысту ">
    <meta charset="UTF-8">
</head>
<body class="body">

<?php
include_once("menu.php");
?>

<div id="square">
    <div class="archive">
        <div class="archivedatediv">
            Последние статьи:
        </div>
        <?php
        while ($row = mysql_fetch_assoc($resultSet)) {
            ?>
            <div class="new" onclick="location.href='news.php?nid=<?php echo $row['id'] ?>'">
                <div class="new_info">
                    <div class="new_infotd">
                        #<?= $row['id'] ?>
                    </div>
                    <div class="new_infotd">
                        <?= $row['date'] ?>
                    </div>
                    <div class="new_infotd">
                        <?= $row['time'] ?>
                    </div>
                </div>
                <div class="new_imgdiv">
                    <img src="news_img/<?= $row['path'] ?>" class="new_img"/>
                </div>
                <div class="new_header">
                    <?= htmlspecialchars($row['header']) ?>
                </div>
                <div class="new_content">
                    <?= getRandomSizeText(40, 300, $row['content']) ?>

                </div>
            </div>

        <?php
        }
        ?>

        <div class="archivebutton" onclick="location.href='news_archive.php'">
            Архив новостей
        </div>
    </div>
</div>

<?php
include_once("navigation.html");
?>

</body>
</html>
